package com.ruoyi.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
/**
 * 骨密度检查
 * @TableName bone_check
 */
@TableName(value ="bone_check")
@Data
public class BoneCheckAdd  implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;


    /**
     *用户id
     */
    private Long userId;

    /**
     * 序号
     */
    private String orderSn;

    @Override
    public String toString() {
        return "BoneCheckAdd{" +
                "id=" + id +
                ", orderSn='" + orderSn + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", race='" + race + '\'' +

                ", birthday=" + birthday +
                ", age=" + age +
                ", height=" + height +
                ", weight=" + weight +
                ", bmi=" + bmi +
                ", t=" + t +
                ", z=" + z +
                ", bmd=" + bmd +
                ", time=" + time +
                ", date=" + date +
                ", idCard='" + idCard + '\'' +
                ", bmdMax=" + bmdMax +
                ", bmdAge=" + bmdAge +
                ", dcmDiagnosis='" + dcmDiagnosis + '\'' +
                ", tel='" + tel + '\'' +
                ", position='" + position + '\'' +
                ", side=" + side +
                ", referralDepartment='" + referralDepartment + '\'' +
                ", submittingDoctor='" + submittingDoctor + '\'' +
                ", inspectDoctor='" + inspectDoctor + '\'' +
                ", hospital='" + hospital + '\'' +
                ", hospitalAddr='" + hospitalAddr + '\'' +
                ", userAddr='" + userAddr + '\'' +
                ", imageFile='" + imageFile + '\'' +
                '}';
    }
//    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//        BoneCheckAdd that = (BoneCheckAdd) o;
//        return Objects.equals(id, that.id) && Objects.equals(orderSn, that.orderSn) && Objects.equals(name, that.name) && Objects.equals(sex, that.sex) && Objects.equals(birthday, that.birthday) && Objects.equals(age, that.age) && Objects.equals(height, that.height) && Objects.equals(weight, that.weight) && Objects.equals(bmi, that.bmi) && Objects.equals(t, that.t) && Objects.equals(z, that.z) && Objects.equals(bmd, that.bmd) && Objects.equals(time, that.time) && Objects.equals(date, that.date) && Objects.equals(idCard, that.idCard) && Objects.equals(bmdMax, that.bmdMax) && Objects.equals(bmdAge, that.bmdAge) && Objects.equals(dcmDiagnosis, that.dcmDiagnosis) && Objects.equals(tel, that.tel) && Objects.equals(position, that.position) && Objects.equals(side, that.side) && Objects.equals(referralDepartment, that.referralDepartment) && Objects.equals(submittingDoctor, that.submittingDoctor) && Objects.equals(inspectDoctor, that.inspectDoctor) && Objects.equals(hospital, that.hospital) && Objects.equals(hospitalAddr, that.hospitalAddr) && Objects.equals(userAddr, that.userAddr) && Objects.equals(imageFile, that.imageFile);
//    }
//
//    @Override
//    public int hashCode() {
//        return Objects.hash(id, orderSn, name, sex, birthday, age, height, weight, bmi, t, z, bmd, time, date, idCard, bmdMax, bmdAge, dcmDiagnosis, tel, position, side, referralDepartment, submittingDoctor, inspectDoctor, hospital, hospitalAddr, userAddr, imageFile);
//    }

    /**
     * 用户姓名
     */
    private String name;

    /**
     * 性别
     */
    private String sex;

    /**
     * 种族
     */
    private String race;


    /**
     * 生日
     */

    private Date birthday;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 身高
     */
    private Integer height;

    /**
     * 体重
     */
    private Integer weight;

    /**
     * BMI
     */
    private BigDecimal bmi;

    /**
     * T值
     */
    private BigDecimal t;

    /**
     * Z值
     */
    private BigDecimal z;

    /**
     * BMD
     */
    private BigDecimal bmd;

    /**
     * 创建时间
     */
    private Long time;

    /**
     * 日期
     */
    private Date date;

    /**
     * 身份证
     */
    private String idCard;

    /**
     * 骨峰值
     */
    private Integer bmdMax;

    /**
     * 骨密度年龄值
     */
    private Integer bmdAge;

    /**
     * 影像诊断
     */
    private String dcmDiagnosis;

    /**
     * 电话
     */
    private String tel;

    /**
     * 部位
     */
    private String position;

    /**
     * 侧别
     */
    private String side;

    /**
     * 送诊科室
     */
    private String referralDepartment;


    /**
     * 送检医生
     */
    private String submittingDoctor;

    /**
     * 检查医生
     */
    private String inspectDoctor;


    /**
     * 医院
     */
    private String hospital;

    /**
     * 医院地址
     */
    private String hospitalAddr;

    /**
     * 用户地址
     */
    private String userAddr;


    /**
     * 图像文件
     */
    private String imageFile;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public void setBirthday(String birthByIdCard) {
        Date parse = DateUtil.parse(birthByIdCard);
        this.birthday = parse;
    }
//
//    @Override
//    public String toString() {
//        StringBuilder sb = new StringBuilder();
//        sb.append(getClass().getSimpleName());
//        sb.append(" [");
//        sb.append("Hash = ").append(hashCode());
//        sb.append(", id=").append(id);
//        sb.append(", orderSn=").append(orderSn);
//        sb.append(", name=").append(name);
//        sb.append(", sex=").append(sex);
//        sb.append(", birthday=").append(birthday);
//        sb.append(", age=").append(age);
//        sb.append(", height=").append(height);
//        sb.append(", weight=").append(weight);
//        sb.append(", bmi=").append(bmi);
//        sb.append(", t=").append(t);
//        sb.append(", z=").append(z);
//        sb.append(", bmd=").append(bmd);
//        sb.append(", time=").append(time);
//        sb.append(", date=").append(date);
//        sb.append(", idCard=").append(idCard);
//        sb.append(", bmdMax=").append(bmdMax);
//        sb.append(", bmdAge=").append(bmdAge);
//        sb.append(", dcmDiagnosis=").append(dcmDiagnosis);
//        sb.append(", tel=").append(tel);
//        sb.append(", position=").append(position);
//        sb.append(", side=").append(side);
//        sb.append(", referralDepartment=").append(referralDepartment);
//        sb.append(", clinicalDiagnosis=").append(clinicalDiagnosis);
//        sb.append(", submittingDoctor=").append(submittingDoctor);
//        sb.append(", inspectDoctor=").append(inspectDoctor);
//        sb.append(", reviewDoctor=").append(reviewDoctor);
//        sb.append(", reportDate=").append(reportDate);
//        sb.append(", hospital=").append(hospital);
//        sb.append(", hospitalAddr=").append(hospitalAddr);
//        sb.append(", userAddr=").append(userAddr);
//        sb.append(", suggest=").append(suggest);
//        sb.append(", imageFile=").append(imageFile);
//        sb.append(", serialVersionUID=").append(serialVersionUID);
//        sb.append("]");
//        return sb.toString();
//    }


}